package gupao.springboot.redis.sub;

import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

@Component
public class MyMsgSubscriber implements MessageListener {
/*    @Autowired
    private  RedisTemplate redisTemplate;*/
    @Override
    public void onMessage(Message message, byte[] pattern) {
        System.out.println(message);
//        redisTemplate.opsForValue().set("1","12312");
    }
}